﻿namespace LZH.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class createdb : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.basicInformationTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        title = c.String(maxLength: 50),
                        keyWord = c.String(maxLength: 500),
                        message = c.String(),
                        logo = c.String(maxLength: 500),
                        rqCode = c.String(maxLength: 50),
                        wechat = c.String(maxLength: 50),
                        qq = c.String(maxLength: 50),
                        phone = c.String(maxLength: 50),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.imageTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        image = c.String(maxLength: 50),
                        message = c.String(),
                        adderss = c.String(maxLength: 50),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.journalTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        contents = c.String(),
                        publisher = c.String(maxLength: 50),
                        numberPoints = c.Int(nullable: false),
                        browseTimes = c.Int(nullable: false),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.juestBooks",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        messageType = c.String(maxLength: 50),
                        journalTitle = c.String(maxLength: 50),
                        messageTimes = c.String(maxLength: 50),
                        messageContent = c.String(),
                        messageName = c.String(maxLength: 50),
                        messageId = c.String(maxLength: 50),
                        address = c.String(maxLength: 50),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.logClassTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        classNames = c.String(maxLength: 50),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.mainTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        name = c.String(maxLength: 50),
                        image = c.String(maxLength: 100),
                        contents = c.String(),
                        rqcode = c.String(maxLength: 50),
                        qq = c.String(maxLength: 50),
                        weChat = c.String(maxLength: 50),
                        phone = c.String(maxLength: 50),
                        skill = c.String(),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.microLists",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        publisherId = c.String(maxLength: 50),
                        content = c.String(),
                        photo = c.String(maxLength: 50),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.UserTables",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 50),
                        userNames = c.String(maxLength: 50),
                        role = c.String(maxLength: 50),
                        accountNumber = c.String(maxLength: 50),
                        passWord = c.String(maxLength: 100),
                        CreateTime = c.DateTime(nullable: false),
                        IsDelete = c.Boolean(nullable: false),
                        spareOne = c.Int(nullable: false),
                        sparetwo = c.String(maxLength: 50),
                        spareThree = c.String(maxLength: 50),
                        spareFour = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.UserTables");
            DropTable("dbo.microLists");
            DropTable("dbo.mainTables");
            DropTable("dbo.logClassTables");
            DropTable("dbo.juestBooks");
            DropTable("dbo.journalTables");
            DropTable("dbo.imageTables");
            DropTable("dbo.basicInformationTables");
        }
    }
}
